package com.zzzyh.spring.mapper;

import com.zzzyh.spring.pojo.Message;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MessagewallMapper {

    @Select("SELECT * FROM `message_info`")
    public List<Message> getMessages();

    @Insert("INSERT INTO `message_info`(`from`,`to`,`message`) " +
            "VALUES(#{from},#{to},#{message})")
    public Integer addMessage(Message message);
}
